/**
 * @private
 * @function
 * @name hashCode
 * @description Calculates simple hash value of a string. Designed for performance, not perfect.
 * @param {string} str - String.
 * @returns {number} Hash value.
 */
function hashCode(str) {
    let hash = 0;
    for (let i = 0, len = str.length; i < len; i++) {
        hash = ((hash << 5) - hash) + str.charCodeAt(i);
        // Convert to 32bit integer
        hash |= 0;
    }
    return hash;
}

export { hashCode };
